<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

class CreateSettingUserLevelTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('setting_user_level', function (Blueprint $table) {
            $table->tinyIncrements('id');
            $table->tinyInteger('level')->default(0)->comment('等级');
            $table->string('title')->default(1)->comment('等级名称');
            $table->integer('number')->default(0)->comment('等级阈值');
            $table->string('icon')->default('')->comment('等级图标');
            $table->timestamps();
            $table->tinyInteger('flag')->default(1)->comment('记录状态');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('setting_user_level');
    }
}
